package com.qidi.service;

import com.qidi.bean.User;
import com.qidi.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhouXinBin
 * @create 2020-11-03-16:56
 */
@Service
public class UserServiceimpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User checkExitUser(String ucode) {
        return userMapper.getByCode(ucode);
    }

    @Override
    public User Login(User user) {
        return userMapper.getByCodeAndPassword(user);
    }

    @Override
    public void Regist(User user) {
        userMapper.save(user);
    }
}
